\hypertarget{classSlimp}{
\section{Slimp Class Reference}
\label{classSlimp}\index{Slimp@{Slimp}}
}
{\tt \#include $<$Slimp.h$>$}

\subsection*{Public Types}
\begin{CompactItemize}
\item 
typedef boost::shared\_\-ptr$<$ \hyperlink{classContact}{Contact} $>$ \hyperlink{classSlimp_98ecc038fa7483a38bcf939a9bc5cef9}{ContactPtr}
\item 
typedef boost::shared\_\-ptr$<$ \hyperlink{classConversation}{Conversation} $>$ \hyperlink{classSlimp_b00f34066bca5000d99b4f7cf9e9fe3e}{ConversationPtr}
\item 
typedef boost::shared\_\-ptr$<$ \hyperlink{classConnection}{Connection} $>$ \hyperlink{classSlimp_c1e3a591903c00b93abe0a72dfe1fa05}{ConnectionPtr}
\item 
typedef boost::shared\_\-ptr$<$ \hyperlink{classAnnounce}{Announce} $>$ \hyperlink{classSlimp_6fb95f51729005ecd0774693589c62f7}{AnnouncePtr}
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\hyperlink{classSlimp_d0d2bf79dfc92c63bcfbe139b4f96cae}{Slimp} ()
\begin{CompactList}\small\item\em The default constructor. \item\end{CompactList}\item 
\hyperlink{classSlimp_ec071522e217066565a9c33a82ce598d}{Slimp} (std::string ip, int port, std::string name)
\begin{CompactList}\small\item\em Parametized constructor. \item\end{CompactList}\item 
virtual \hyperlink{classSlimp_297a52fd86f10a3562cbef19c7081ea9}{$\sim$Slimp} ()
\begin{CompactList}\small\item\em The default destructor. \item\end{CompactList}\item 
std::string \hyperlink{classSlimp_19c82d32cae6a0ea3d4ab0b117590de2}{getIP} () const 
\begin{CompactList}\small\item\em returns the IP address \item\end{CompactList}\item 
int \hyperlink{classSlimp_3ef615bb696a19cd4a4f76a02670f30b}{getPort} () const 
\begin{CompactList}\small\item\em returns the port \item\end{CompactList}\item 
std::string \hyperlink{classSlimp_17c4f3e1e4db4b4b685b506380775818}{getName} () const 
\begin{CompactList}\small\item\em returns the user name \item\end{CompactList}\item 
void \hyperlink{classSlimp_9aadb4742e3b7345a0ab6eb86d06edfb}{sendAnnounce} (\hyperlink{classSlimp_6fb95f51729005ecd0774693589c62f7}{AnnouncePtr} announce) const 
\begin{CompactList}\small\item\em send an announce to the network \item\end{CompactList}\item 
void \hyperlink{classSlimp_4cf202a9b7f6db3b5020c82e77decaf4}{receiveAnnounce} (\hyperlink{classSlimp_6fb95f51729005ecd0774693589c62f7}{AnnouncePtr} announce)
\begin{CompactList}\small\item\em called when receiving an announce \item\end{CompactList}\item 
void \hyperlink{classSlimp_81b38e5e027633691e9813b521ab4a75}{addContact} (\hyperlink{classSlimp_98ecc038fa7483a38bcf939a9bc5cef9}{ContactPtr} contact)
\begin{CompactList}\small\item\em adds a new contact \item\end{CompactList}\item 
void \hyperlink{classSlimp_6b471f3afab7adf524d83f4dc9782ab8}{addConversation} (\hyperlink{classSlimp_b00f34066bca5000d99b4f7cf9e9fe3e}{ConversationPtr} conversation)
\begin{CompactList}\small\item\em adds a conversation \item\end{CompactList}\item 
void \hyperlink{classSlimp_6b22b5dfb0960fb6ba6665659a47fd12}{addConnection} (\hyperlink{classSlimp_c1e3a591903c00b93abe0a72dfe1fa05}{ConnectionPtr} connection)
\begin{CompactList}\small\item\em adds a tcp connection to an other slimp client \item\end{CompactList}\item 
std::string \hyperlink{classSlimp_44d45ad5a7075224e138ab9b15761945}{getVersion} () const 
\begin{CompactList}\small\item\em returns the current version \item\end{CompactList}\item 
std::string \hyperlink{classSlimp_49370f143445d06dc9221bbabfcb2d87}{getHostname} () const 
\begin{CompactList}\small\item\em returns the hostname \item\end{CompactList}\end{CompactItemize}
\subsection*{Private Attributes}
\begin{CompactItemize}
\item 
int \hyperlink{classSlimp_0ae6f041f9a65ce0f33d6e979b7bb2ea}{listenPort}
\item 
std::string \hyperlink{classSlimp_20d4c84b3d73f1442b7564bfa6edbd79}{listenIP}
\item 
std::string \hyperlink{classSlimp_d10f0e4be04ccbaa6e5ee95aa6ee6b75}{userName}
\item 
std::vector$<$ \hyperlink{classSlimp_98ecc038fa7483a38bcf939a9bc5cef9}{ContactPtr} $>$ \hyperlink{classSlimp_8d146eae36ee736b4af74d4538482723}{contactList}
\item 
std::vector$<$ \hyperlink{classSlimp_b00f34066bca5000d99b4f7cf9e9fe3e}{ConversationPtr} $>$ \hyperlink{classSlimp_0e7609ac4d139db2d77baa4e4c7988dd}{conversationList}
\item 
std::vector$<$ \hyperlink{classSlimp_c1e3a591903c00b93abe0a72dfe1fa05}{ConnectionPtr} $>$ \hyperlink{classSlimp_b0a4434802fd3f5fc0f59e693d663180}{connectionList}
\item 
sockaddr\_\-in \hyperlink{classSlimp_d92b46c6ba7cd8259bad22152952030b}{addr}
\item 
hostent $\ast$ \hyperlink{classSlimp_8d948a061e1f77f76e569b2a96c0644d}{host}
\item 
char \hyperlink{classSlimp_51057f8f94aae69990215296abba7269}{hostname} \mbox{[}\hyperlink{classSlimp_7e90819aaf9e137809f8271254cb7a47}{MAX\_\-HOSTNAME\_\-LENGTH}\mbox{]}
\end{CompactItemize}
\subsection*{Static Private Attributes}
\begin{CompactItemize}
\item 
static const int \hyperlink{classSlimp_7e90819aaf9e137809f8271254cb7a47}{MAX\_\-HOSTNAME\_\-LENGTH} = 15
\end{CompactItemize}


\subsection{Detailed Description}


Definition at line 28 of file Slimp.h.

\subsection{Member Typedef Documentation}
\hypertarget{classSlimp_98ecc038fa7483a38bcf939a9bc5cef9}{
\index{Slimp@{Slimp}!ContactPtr@{ContactPtr}}
\index{ContactPtr@{ContactPtr}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}typedef boost::shared\_\-ptr$<${\bf Contact}$>$ {\bf Slimp::ContactPtr}}}
\label{classSlimp_98ecc038fa7483a38bcf939a9bc5cef9}




Definition at line 31 of file Slimp.h.\hypertarget{classSlimp_b00f34066bca5000d99b4f7cf9e9fe3e}{
\index{Slimp@{Slimp}!ConversationPtr@{ConversationPtr}}
\index{ConversationPtr@{ConversationPtr}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}typedef boost::shared\_\-ptr$<${\bf Conversation}$>$ {\bf Slimp::ConversationPtr}}}
\label{classSlimp_b00f34066bca5000d99b4f7cf9e9fe3e}




Definition at line 32 of file Slimp.h.\hypertarget{classSlimp_c1e3a591903c00b93abe0a72dfe1fa05}{
\index{Slimp@{Slimp}!ConnectionPtr@{ConnectionPtr}}
\index{ConnectionPtr@{ConnectionPtr}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}typedef boost::shared\_\-ptr$<${\bf Connection}$>$ {\bf Slimp::ConnectionPtr}}}
\label{classSlimp_c1e3a591903c00b93abe0a72dfe1fa05}




Definition at line 33 of file Slimp.h.\hypertarget{classSlimp_6fb95f51729005ecd0774693589c62f7}{
\index{Slimp@{Slimp}!AnnouncePtr@{AnnouncePtr}}
\index{AnnouncePtr@{AnnouncePtr}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}typedef boost::shared\_\-ptr$<${\bf Announce}$>$ {\bf Slimp::AnnouncePtr}}}
\label{classSlimp_6fb95f51729005ecd0774693589c62f7}




Definition at line 34 of file Slimp.h.

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classSlimp_d0d2bf79dfc92c63bcfbe139b4f96cae}{
\index{Slimp@{Slimp}!Slimp@{Slimp}}
\index{Slimp@{Slimp}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Slimp::Slimp ()}}
\label{classSlimp_d0d2bf79dfc92c63bcfbe139b4f96cae}


The default constructor. 

userName will be the current users name. IP defaults to the current IP address. Port defaults to 9090. 

Definition at line 10 of file Slimp.cpp.

References addr, host, hostname, MAX\_\-HOSTNAME\_\-LENGTH, and userName.\hypertarget{classSlimp_ec071522e217066565a9c33a82ce598d}{
\index{Slimp@{Slimp}!Slimp@{Slimp}}
\index{Slimp@{Slimp}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Slimp::Slimp (std::string {\em ip}, \/  int {\em port}, \/  std::string {\em name})}}
\label{classSlimp_ec071522e217066565a9c33a82ce598d}


Parametized constructor. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ip}]sets the IP to listen on \item[{\em port}]sets the port to listen on \item[{\em name}]sets name of the user \end{description}
\end{Desc}


Definition at line 125 of file Slimp.cpp.

References listenIP, listenPort, and userName.\hypertarget{classSlimp_297a52fd86f10a3562cbef19c7081ea9}{
\index{Slimp@{Slimp}!$\sim$Slimp@{$\sim$Slimp}}
\index{$\sim$Slimp@{$\sim$Slimp}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Slimp::$\sim$Slimp ()\hspace{0.3cm}{\tt  \mbox{[}virtual\mbox{]}}}}
\label{classSlimp_297a52fd86f10a3562cbef19c7081ea9}


The default destructor. 



Definition at line 114 of file Slimp.cpp.

\subsection{Member Function Documentation}
\hypertarget{classSlimp_19c82d32cae6a0ea3d4ab0b117590de2}{
\index{Slimp@{Slimp}!getIP@{getIP}}
\index{getIP@{getIP}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::string Slimp::getIP () const}}
\label{classSlimp_19c82d32cae6a0ea3d4ab0b117590de2}


returns the IP address 



Definition at line 42 of file Slimp.cpp.

References addr.

Referenced by SlimpApp::OnInit().

Here is the caller graph for this function:\hypertarget{classSlimp_3ef615bb696a19cd4a4f76a02670f30b}{
\index{Slimp@{Slimp}!getPort@{getPort}}
\index{getPort@{getPort}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Slimp::getPort () const}}
\label{classSlimp_3ef615bb696a19cd4a4f76a02670f30b}


returns the port 



Definition at line 33 of file Slimp.cpp.

References addr.

Referenced by SlimpApp::OnInit().

Here is the caller graph for this function:\hypertarget{classSlimp_17c4f3e1e4db4b4b685b506380775818}{
\index{Slimp@{Slimp}!getName@{getName}}
\index{getName@{getName}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::string Slimp::getName () const}}
\label{classSlimp_17c4f3e1e4db4b4b685b506380775818}


returns the user name 



Definition at line 24 of file Slimp.cpp.

References userName.

Referenced by SlimpApp::OnInit().

Here is the caller graph for this function:\hypertarget{classSlimp_9aadb4742e3b7345a0ab6eb86d06edfb}{
\index{Slimp@{Slimp}!sendAnnounce@{sendAnnounce}}
\index{sendAnnounce@{sendAnnounce}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Slimp::sendAnnounce ({\bf AnnouncePtr} {\em announce}) const}}
\label{classSlimp_9aadb4742e3b7345a0ab6eb86d06edfb}


send an announce to the network 



Definition at line 69 of file Slimp.cpp.\hypertarget{classSlimp_4cf202a9b7f6db3b5020c82e77decaf4}{
\index{Slimp@{Slimp}!receiveAnnounce@{receiveAnnounce}}
\index{receiveAnnounce@{receiveAnnounce}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Slimp::receiveAnnounce ({\bf AnnouncePtr} {\em announce})}}
\label{classSlimp_4cf202a9b7f6db3b5020c82e77decaf4}


called when receiving an announce 



Definition at line 78 of file Slimp.cpp.\hypertarget{classSlimp_81b38e5e027633691e9813b521ab4a75}{
\index{Slimp@{Slimp}!addContact@{addContact}}
\index{addContact@{addContact}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Slimp::addContact ({\bf ContactPtr} {\em contact})}}
\label{classSlimp_81b38e5e027633691e9813b521ab4a75}


adds a new contact 



Definition at line 105 of file Slimp.cpp.

References contactList.

Referenced by SlimpApp::OnInit().

Here is the caller graph for this function:\hypertarget{classSlimp_6b471f3afab7adf524d83f4dc9782ab8}{
\index{Slimp@{Slimp}!addConversation@{addConversation}}
\index{addConversation@{addConversation}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Slimp::addConversation ({\bf ConversationPtr} {\em conversation})}}
\label{classSlimp_6b471f3afab7adf524d83f4dc9782ab8}


adds a conversation 



Definition at line 96 of file Slimp.cpp.

References conversationList.\hypertarget{classSlimp_6b22b5dfb0960fb6ba6665659a47fd12}{
\index{Slimp@{Slimp}!addConnection@{addConnection}}
\index{addConnection@{addConnection}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Slimp::addConnection ({\bf ConnectionPtr} {\em connection})}}
\label{classSlimp_6b22b5dfb0960fb6ba6665659a47fd12}


adds a tcp connection to an other slimp client 



Definition at line 87 of file Slimp.cpp.

References connectionList.\hypertarget{classSlimp_44d45ad5a7075224e138ab9b15761945}{
\index{Slimp@{Slimp}!getVersion@{getVersion}}
\index{getVersion@{getVersion}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::string Slimp::getVersion () const}}
\label{classSlimp_44d45ad5a7075224e138ab9b15761945}


returns the current version 



Definition at line 51 of file Slimp.cpp.

References AutoVersion::FULLVERSION\_\-STRING.

Referenced by SlimpApp::OnInit().

Here is the caller graph for this function:\hypertarget{classSlimp_49370f143445d06dc9221bbabfcb2d87}{
\index{Slimp@{Slimp}!getHostname@{getHostname}}
\index{getHostname@{getHostname}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::string Slimp::getHostname () const}}
\label{classSlimp_49370f143445d06dc9221bbabfcb2d87}


returns the hostname 



Definition at line 60 of file Slimp.cpp.

References host.

Referenced by SlimpApp::OnInit().

Here is the caller graph for this function:

\subsection{Member Data Documentation}
\hypertarget{classSlimp_7e90819aaf9e137809f8271254cb7a47}{
\index{Slimp@{Slimp}!MAX\_\-HOSTNAME\_\-LENGTH@{MAX\_\-HOSTNAME\_\-LENGTH}}
\index{MAX\_\-HOSTNAME\_\-LENGTH@{MAX\_\-HOSTNAME\_\-LENGTH}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const int {\bf Slimp::MAX\_\-HOSTNAME\_\-LENGTH} = 15\hspace{0.3cm}{\tt  \mbox{[}static, private\mbox{]}}}}
\label{classSlimp_7e90819aaf9e137809f8271254cb7a47}




Definition at line 37 of file Slimp.h.

Referenced by Slimp().\hypertarget{classSlimp_0ae6f041f9a65ce0f33d6e979b7bb2ea}{
\index{Slimp@{Slimp}!listenPort@{listenPort}}
\index{listenPort@{listenPort}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf Slimp::listenPort}\hspace{0.3cm}{\tt  \mbox{[}private\mbox{]}}}}
\label{classSlimp_0ae6f041f9a65ce0f33d6e979b7bb2ea}




Definition at line 59 of file Slimp.h.

Referenced by Slimp().\hypertarget{classSlimp_20d4c84b3d73f1442b7564bfa6edbd79}{
\index{Slimp@{Slimp}!listenIP@{listenIP}}
\index{listenIP@{listenIP}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::string {\bf Slimp::listenIP}\hspace{0.3cm}{\tt  \mbox{[}private\mbox{]}}}}
\label{classSlimp_20d4c84b3d73f1442b7564bfa6edbd79}




Definition at line 60 of file Slimp.h.

Referenced by Slimp().\hypertarget{classSlimp_d10f0e4be04ccbaa6e5ee95aa6ee6b75}{
\index{Slimp@{Slimp}!userName@{userName}}
\index{userName@{userName}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::string {\bf Slimp::userName}\hspace{0.3cm}{\tt  \mbox{[}private\mbox{]}}}}
\label{classSlimp_d10f0e4be04ccbaa6e5ee95aa6ee6b75}




Definition at line 61 of file Slimp.h.

Referenced by getName(), and Slimp().\hypertarget{classSlimp_8d146eae36ee736b4af74d4538482723}{
\index{Slimp@{Slimp}!contactList@{contactList}}
\index{contactList@{contactList}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::vector$<${\bf ContactPtr}$>$ {\bf Slimp::contactList}\hspace{0.3cm}{\tt  \mbox{[}private\mbox{]}}}}
\label{classSlimp_8d146eae36ee736b4af74d4538482723}




Definition at line 62 of file Slimp.h.

Referenced by addContact().\hypertarget{classSlimp_0e7609ac4d139db2d77baa4e4c7988dd}{
\index{Slimp@{Slimp}!conversationList@{conversationList}}
\index{conversationList@{conversationList}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::vector$<${\bf ConversationPtr}$>$ {\bf Slimp::conversationList}\hspace{0.3cm}{\tt  \mbox{[}private\mbox{]}}}}
\label{classSlimp_0e7609ac4d139db2d77baa4e4c7988dd}




Definition at line 63 of file Slimp.h.

Referenced by addConversation().\hypertarget{classSlimp_b0a4434802fd3f5fc0f59e693d663180}{
\index{Slimp@{Slimp}!connectionList@{connectionList}}
\index{connectionList@{connectionList}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}std::vector$<${\bf ConnectionPtr}$>$ {\bf Slimp::connectionList}\hspace{0.3cm}{\tt  \mbox{[}private\mbox{]}}}}
\label{classSlimp_b0a4434802fd3f5fc0f59e693d663180}




Definition at line 64 of file Slimp.h.

Referenced by addConnection().\hypertarget{classSlimp_d92b46c6ba7cd8259bad22152952030b}{
\index{Slimp@{Slimp}!addr@{addr}}
\index{addr@{addr}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}sockaddr\_\-in {\bf Slimp::addr}\hspace{0.3cm}{\tt  \mbox{[}private\mbox{]}}}}
\label{classSlimp_d92b46c6ba7cd8259bad22152952030b}




Definition at line 65 of file Slimp.h.

Referenced by getIP(), getPort(), and Slimp().\hypertarget{classSlimp_8d948a061e1f77f76e569b2a96c0644d}{
\index{Slimp@{Slimp}!host@{host}}
\index{host@{host}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}hostent$\ast$ {\bf Slimp::host}\hspace{0.3cm}{\tt  \mbox{[}private\mbox{]}}}}
\label{classSlimp_8d948a061e1f77f76e569b2a96c0644d}




Definition at line 66 of file Slimp.h.

Referenced by getHostname(), and Slimp().\hypertarget{classSlimp_51057f8f94aae69990215296abba7269}{
\index{Slimp@{Slimp}!hostname@{hostname}}
\index{hostname@{hostname}!Slimp@{Slimp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char {\bf Slimp::hostname}\mbox{[}{\bf MAX\_\-HOSTNAME\_\-LENGTH}\mbox{]}\hspace{0.3cm}{\tt  \mbox{[}private\mbox{]}}}}
\label{classSlimp_51057f8f94aae69990215296abba7269}




Definition at line 67 of file Slimp.h.

Referenced by Slimp().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
include/\hyperlink{Slimp_8h}{Slimp.h}\item 
src/\hyperlink{Slimp_8cpp}{Slimp.cpp}\end{CompactItemize}
